package com.fsserver.facedetection.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * 人脸特征信息
 * 
 * @author fsserver
 * @since 2024-01-01
 */
@Data
@ApiModel(description = "人脸特征信息")
public class FaceFeature {

    @ApiModelProperty(value = "人脸位置")
    private FaceRect faceRect;

    @ApiModelProperty(value = "眼部特征点")
    private List<Point> eyePoints;

    @ApiModelProperty(value = "鼻部特征点")
    private List<Point> nosePoints;

    @ApiModelProperty(value = "嘴部特征点")
    private List<Point> mouthPoints;

    @ApiModelProperty(value = "人脸轮廓特征点")
    private List<Point> faceContourPoints;

    @ApiModelProperty(value = "特征向量")
    private double[] featureVector;

    @ApiModelProperty(value = "年龄估计", example = "25")
    private Integer estimatedAge;

    @ApiModelProperty(value = "性别估计", example = "MALE")
    private String estimatedGender;

    @ApiModelProperty(value = "情绪估计", example = "HAPPY")
    private String estimatedEmotion;

    /**
     * 特征点坐标
     */
    @Data
    @ApiModel(description = "特征点坐标")
    public static class Point {
        @ApiModelProperty(value = "X坐标", example = "150")
        private Integer x;

        @ApiModelProperty(value = "Y坐标", example = "100")
        private Integer y;

        public Point() {}

        public Point(int x, int y) {
            this.x = x;
            this.y = y;
        }
    }
} 